package com.whmall.service.crm.enumeration;

public enum SupplierDevelopPoolOperationTypeEnum {

    /**
     * 获取供应商  get_supplier
     */
    GET_SUPPLIER(1),

    /**
     * 释放供应商  release_supplier
     */
    RELEASE_SUPPLIER(2),

    /**
     * 添加控制目录  add_control_directory
     */
    ADD_CONTROL_DIRECTORY(3),

    /**
     * 移除控制目录   remove_control_directory
     */
    REMOVE_CONTROL_DIRECTORY(4),

    /**
     * 驻场供应商新建 create_resident_supplier
     */
    CREATE_RESIDENT_SUPLIER(5),

    /**
     * 驻场供应商停用 disable_resident_supplier
     */
    DISABLE_RESIDENT_SUPLIER(6);

    public static SupplierDevelopPoolOperationTypeEnum fromNullableValue(Integer value) {
        if (null == value) {
            return null;
        }

        return fromValue(value);
    }

    public static SupplierDevelopPoolOperationTypeEnum fromValue(int value) {
        for (SupplierDevelopPoolOperationTypeEnum anEnum : values()) {
            if (anEnum.getValue() == value) {
                return anEnum;
            }
        }

        throw new UnsupportedOperationException("不支持的状态=" + value);
    }

    SupplierDevelopPoolOperationTypeEnum(int value) {
        this.value = value;
    }

    private final int value;

    public int getValue() {
        return value;
    }

}
